import Vue from 'vue'
import VueRouter from 'vue-router'
import BuyerView from '@/views/BuyerView.vue'
import OrderView from "@/views/OrderView.vue";
import SellerView from "@/views/SellerView.vue";
import HomeView from "@/views/HomeView.vue";

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'home',
    component: HomeView
  },
  {
    path: '/buyer',
    name: 'buyer_item',
    component: BuyerView
  },
  {
    path: '/seller',
    name: 'seller_item',
    component: SellerView
  },
  {
    path: '/order',
    name: 'order',
    component: OrderView
  },
  {
    path: '/about',
    name: 'about',
    // route level code-splitting
    // this generates a separate chunk (about.[hash].js) for this route
    // which is lazy-loaded when the route is visited.
    component: () => import(/* webpackChunkName: "about" */ '../views/AboutView.vue')
  }
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
